<template>
    <view  class="gui-border-t" style="padding: 20rpx;" v-for="(k,index) in materialGroups" :key="index">
        <view class="card-body-item" v-if="keyName == '1'">
            <text class="body-item-title">{{$t('consumo.purchaseOrderNo')}}：</text> {{k.line}}
        </view>
        <view class="card-body-item">
            <text class="body-item-title">{{$t('distributedEnter.materialCode')}}：</text> {{k.materialCode}}
        </view>
        <view class="card-body-item">
            <text class="body-item-title">{{$t('distributedEnter.materialName')}}：</text> {{k.materialName}}
        </view>
        <view class="card-body-item" v-if="k.materialSpec != ' '|| k.spec!= ' '">
            <text class="body-item-title">{{$t('distributedEnter.materialSpec')}}：</text> {{k.materialSpec || k.spec}}
        </view>
        <view class="card-body-item">
            <text class="body-item-title">{{$t('distributedEnter.materialQty')}}：</text> {{k.sumQty || k.qty}}
        </view>
        <view class="card-body-item" v-if="keyName == '1'">
            <text class="body-item-title">{{$t('pageTranslation.retiredNumber')}}：</text> {{k.returnTotalQty || k.returnQty}}
        </view>
        <view class="card-body-item" v-if="k.instockQty">
            <text class="body-item-title">{{$t('distributedEnter.quantityInStorage')}}：</text> {{k.instockQty}}
        </view>
        <view class="card-body-item">
            <text class="body-item-title">{{$t('distributedEnter.uom')}}：</text> {{k.unit}}
        </view>
        <view class="card-body-item" v-if="k.contractNumber">
            <text class="body-item-title">{{$t('locationBarcodeInfo.contractNo')}}：</text> {{k.contractNumber}}
        </view>
    </view>
</template>

<script setup>
	import {
		defineProps
	} from 'vue'
	const props = defineProps({
        // 标识五金退料界面展示标识
        keyName: {
            type: String,
            default: '0'
        },
		// 传过来的数组
		materialGroups: {
			type: Array,
			default: []
		},
	})
</script>

<style lang="scss">

</style>
